fix(opencode): include skill files when invoking via slash command - #35522
fix(opencode): include skill files when invoking via slash command#355220xSkybreaker wants to merge 1 commit into
Conversation
|
Hi, I submitted #37044 which addresses the same issue with a slightly different approach — using \Glob.scanSync()\ (synchronous) instead of \Glob.scan().then()\ to keep the template getter simple, and */\ to include subdirectory files. Both approaches are valid. Happy to close mine if you prefer to continue with this one — just wanted to avoid duplicate work. Either way, this bug definitely needs fixing! |
|
Automated PR Cleanup Thank you for contributing to opencode. Due to the high volume of PRs from users and AI agents, we periodically close older PRs using automated criteria so maintainers can focus review time on the most active and community-supported contributions. This PR was closed because it matched the following cleanup criteria:
PRs created within the last month are not affected by this cleanup. If you believe this PR was closed incorrectly, or if you are still actively working on it, please leave a comment explaining why it should be reopened. A maintainer can review and reopen it if appropriate. Thanks again for taking the time to contribute. |
Issue for this PR
Closes #24831
Type of change
What does this PR do?
/skill-nameonly injected the skill markdown body as prompt text, without the<skill_files>section that theskilltool provides. This meant referenced files (e.g. scripts, reference docs) were not discoverable by the model when using the slash command shortcut.The fix makes the skill command template include sampled files (up to 10) from the skill directory, matching the behavior of the
skilltool (tool/skill.ts).The change is in
command/index.ts: for skills with a real location, the template now usesGlob.scanto list files and appends a<skill_files>section, same format as the skill tool output.How did you verify your code works?
packages/opencode<skill_files>format fromtool/skill.ts<built-in>location) are unchanged — they still return just the contentScreenshots / recordings
No UI change.
Checklist